function t(t, a, e) {
  return a in t ? Object.defineProperty(t, a, {
    value: e,
    enumerable: !0,
    configurable: !0,
    writable: !0
  }) : t[a] = e, t;
}

var a = function(t) {
    return t && t.__esModule ? t : {
      default: t
    };
  }(require("../../../../utils/toot.js")),
  e = require("../../../../utils/wxcharts.js");

getApp();

Page({
  data: {
    curHdIndex: 2,
    areaChartArr: [],
    cdName:'心脏',
    msgData:[
      {
        nmQuantiUnit:'2018-11-02',
        nmIndexLis: '血液流速',
        limitLow:30,
        limitHigh:40
      }
    ]
  },
  touchHandler: function(t) {
    this.data.areaChartArr[0].scrollStart(t);
  },
  moveHandler: function(t) {
    this.data.areaChartArr[0].scroll(t);
  },
  touchEndHandler: function(t) {
    this.data.areaChartArr[0].scrollEnd(t), this.data.areaChartArr[0].showToolTip(t);
  },
  onLoad: function(t) {
    // var e = this,
    //   r = wx.getStorageSync("flag") || "";
    // e.setData({
    //   teamId: t.teamId || "",
    //   flag: r
    // });
    // var n = wx.getStorageSync("patientId") + "_" + wx.getStorageSync("log") + e.data.teamId,
    //   i = t.cdIndexLis,
    //   o = this.data.curHdIndex;
    // a.default.getEmItem(t, e);
    // var d = 320;
    // try {
    //   d = wx.getSystemInfoSync().windowWidth, e.setData({
    //     windowWidth: d
    //   });
    // } catch (t) {
    //   console.error("getSystemInfoSync failed!");
    // }
    // this.setData({
    //   cdName: t.cdName,
    //   cdIndexLis: i
    // }), wx.setNavigationBarTitle({
    //   title: e.data.cdName
    // }), a.default.getTimeData(e, n, i, o, "canvas");
  },
  chartList: function(a, r, n, i, o, d, l) {
    return new e(t({
      canvasId: a,
      type: "line",
      categories: n,
      animation: !0,
      series: [{
        maxValue: 11,
        minValue: 3,
        name: l,
        data: i,
        format: function(t) {
          return t.toFixed(2);
        }
      }],
      yAxis: {
        format: function(t) {
          return t.toFixed(2);
        },
        min: o,
        max: d,
        fontColor: "#999999",
        gridColor: "#f0f0f0"
      },
      xAxis: {
        fontColor: "#999999",
        disableGrid: !0
      },
      extra: {
        legendTextColor: "red"
      },
      dataLabel: !1,
      width: r,
      height: 190,
      dataPointShape: !0,
      enableScroll: !0
    }, "extra", {
      lineStyle: "curve"
    }));
  },
  onReady: function (e) {
    // 使用 wx.createContext 获取绘图上下文 context
    var context = wx.createCanvasContext('abc');
    context.setStrokeStyle("#00ff00")
    context.setLineWidth(5)
    context.stroke()
    context.setStrokeStyle("#ff0000")
    context.setLineWidth(2)
    context.arc(0, 200, 10, 0, 0, )
    context.arc(0, 100, 40, 0, 0, )
    context.arc(0, 100, 40, 0, 0, )
    context.arc(0, 80, 80, 0, 0, )
    context.arc(0, 80, 80, 0, 0, )
    context.arc(0, 60, 120, 0, 0, )
    context.arc(0, 60, 120, 0, 0, )
    context.arc(0, 150, 160, 0, 0, )
    context.arc(0, 150, 160, 0, 0, )
    context.arc(0, 100, 200, 0, 0, )
    context.arc(0, 100, 200, 0, 0, )
    context.arc(0, 200, 240, 0, 0, )
    context.stroke()
    context.draw()
  }
});